package com.electronic.modules.electronicSealSignature.result;

import com.cebpubservice.cashare.sdk.electronicsealsignatureandverifysignature.result.QueryQRCodeScannedStatusResultDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @Author: IFCA
 * @Description: 获取签章二维码扫码状态返回对象
 */
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class GetQrCodeScanStatusVO {

    /**
     * 事件ID
     */
    private String tid;

    /**
     * 签章二维码扫描状态 (00:未扫码 01:已扫码未授权 02:已失效 03:已扫码已授权)
     */
    private String scannedStatus;

    /**
     * 签章二维码扫描状态描述 (00:未扫码 01:已扫码未授权 02:已失效 03:已扫码已授权)
     */
    private String scannedDesc;

    /**
     * 请求token
     */
    private String token;

    public static GetQrCodeScanStatusVO convert(QueryQRCodeScannedStatusResultDTO resultDTO) {
        GetQrCodeScanStatusVO vo = GetQrCodeScanStatusVO.builder().build();
        BeanUtils.copyProperties(resultDTO, vo);
        return vo;
    }
}
